package com.five.dao;

import com.five.pojo.ClubInform;
import org.apache.ibatis.annotations.*;

import java.util.List;

@Mapper
public interface ClubInformDao {
    @Insert("insert into clubinform(c_title , c_particulars , c_retime , status) " +
            "values (#{cTitle} , #{cParticulars} , #{cReTime} , #{status})")
    void addInform(ClubInform clubInform);

    @Update("update clubinform set status=#{status} where id=#{id}")
    void ModStatus(Integer status, Integer id);

    @Select("select * from clubinform ORDER BY c_retime DESC")
    List<ClubInform> findInform();

    @Delete("delete from clubinform where id=#{id} ")
    void deleteInform(Integer id);

    @Update("update clubinform set c_title=#{cTitle} , c_particulars=#{cParticulars} , c_retime=#{cReTime} where id=#{id}")
    void updateInForm(ClubInform clubInform);
}
